//
//  Comm.swift
//  CAPSwift
//
//  Created by captain on 16/4/18.
//  Copyright © 2016年 captain. All rights reserved.
//

import UIKit
//通知
let NOTI = "switchVCNoti"

let SWIDTH = UIScreen.mainScreen().bounds.width
let SHEIGHT = UIScreen.mainScreen().bounds.height

let CZWeiboName = "yeschenbaby@sina.com"
let CZWeiboPasswd = "taoyanni74521"

//    App Key：1872328079
//    App Secret：8830521c75f25528a704c3cd7250db0c
let APPKEY = "1872328079"
let APPSECRET = "8830521c75f25528a704c3cd7250db0c"
let REDIRECT_URI = "http://www.baidu.com/"


// RGB颜色
func RGB(red red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
}
// 随机颜色
func RandomColor() -> UIColor{
    
    // random() 有一个bug 每次程序启动起来后产生的随机数 都是相同
    let r = random() % 256
    let g = random() % 256
    let b = random() % 256
    return RGB(red: CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}